import pymysql


db = pymysql.connect(user="devil", password="123456", database="dict")
cur = db.cursor()

user = input("")
password = input("")

sql = "select password from users where user=%s;"
cur.execute(sql, user)
pa = cur.fetchone()[0]
if password == pa:
    print("Hello world")
else:
    print("You have something wrong in your user or password")
